﻿#define _CRT_SECURE_NO_WARNINGS

#include<iostream>

using namespace std;

#if 0
// 前置声明，都则A的友元函数声明编译器不认识B
class B;

class A
{
public:
	//B是A的友元类(友元声明)
	friend class B;
	//func是A类的友元函数(友元声明)
	friend void func(const A& aa,const B& bb);
private:
	int _a1 = 1;
	int _a2 = 2;
};

class B
{
public:
	friend void func(const A& aa, const B& bb);
private:
	int _b1 = 3;
	int _b2 = 4;
};

void func(const A& aa, const B& bb)
{
	cout << aa._a1 << endl;
	cout << aa._a2 << endl;
	cout << bb._b1 << endl;
	cout << bb._b2 << endl;
}

int main()
{
	A aa1;
	B bb1;
	func(aa1,bb1);
	return 0;
}


class A
{
public:
	//内部类
	class B//默认是A的友元类
	{
	public:
		void func(A& aa)
		{
			A::a++;
			aa.b++;
		}
	private:
		int b1 = 1;
		int b2 = 2;
	};
private:
	static int a;
	int b = 1;
};

int main()
{
	A a;
	cout << sizeof(a) << endl;
	return 0;
}


class A
{

};

int main()
{
	A();//定义的匿名对象，生命周期只存在当前这一行
}



class A
{
public:
	A(int a = 0)
		:_a(a)
	{
		cout << "A(int a)" << endl;
	}
	~A()
	{
		cout << "~A()" << endl;
	}
private:
	int _a;
};
class Solution {
public:
	int Sum_Solution(int n) {
		//...
		return n;
	}
};
int main()
{
	A aa1;
	// 不能这么定义对象，因为编译器⽆法识别下⾯是⼀个函数声明，还是对象定义
	//A aa1();
	// 但是我们可以这么定义匿名对象，匿名对象的特点不⽤取名字，
	// 但是他的⽣命周期只有这⼀⾏，我们可以看到下⼀⾏他就会⾃动调⽤析构函数
	A();
	A(1);
	A aa2(2);
	// 匿名对象在这样场景下就很好⽤，当然还有⼀些其他使⽤场景，这个我们以后遇到了再说
	Solution().Sum_Solution(10);
	return 0;
}
#endif

int main()
{
	int day1, day2, mon1, mon2, year1, year2;
	scanf("%4d%2d%2d", &year1, &mon1, &day1);
	scanf("%4d%2d%2d", &year2, &mon2, &day2);
	cout << year1 << mon1 << day1 << endl;
	return 0;
}
